const { createHmac } = require('crypto');
// 加盐
const secret = 'abcdefg';
const hash = createHmac('sha256', secret)
               .update('123456')
               .digest('hex');
console.log(hash);